package com.walixiwa.player;

import android.text.TextUtils;
import android.util.Log;

import com.dueeeke.videoplayer.player.ProgressManager;
import com.walixiwa.player.utils.VodPositionManager;

public class DetailProgressManager extends ProgressManager {

    @Override
    public void saveProgress(String url, long progress) {
        if (TextUtils.isEmpty(url)) {
            return;
        }
        VodPositionManager.getInstance().setPosition(url, progress);
    }

    @Override
    public long getSavedProgress(String url) {
        if (TextUtils.isEmpty(url)) {
            return 0;
        }
        Log.e("DetailProgressManager", "progress: "+VodPositionManager.getInstance().getPosition(url));
        return VodPositionManager.getInstance().getPosition(url);
    }
}
